import { I18nextProvider } from "react-i18next";
import i18n from "./i18n";
import "./i18n";
import { RouterProvider } from "react-router-dom";
import { Provider } from "react-redux";
import router from "./router/index";
import { store, persistor } from "./store/index.ts";
import { PersistGate } from "redux-persist/integration/react";
import { ThemeProvider } from "./theme/ThemeProvider";
import { StrictMode } from "react";

function App() {
  return (
    <StrictMode>
      <I18nextProvider i18n={i18n}>
        <Provider store={store}>
          <PersistGate loading={null} persistor={persistor}>
            <ThemeProvider>
              <RouterProvider router={router} />
            </ThemeProvider>
          </PersistGate>
        </Provider>
      </I18nextProvider>
    </StrictMode>
  );
}

export default App;
